<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <p>表单元素的处理——获取值、设置值</p>
    <input type="text" v-model="val1">
    <p>val1: {{val1}}</p>
    <hr>
    <textarea v-model="val2"></textarea>
    <p>val2: {{val2}}</p>
    <p>性别</p>
    <input type="radio" value="nan" v-model="val3">男
    <input type="radio" value="nv" v-model="val3">女
    <input type="radio" value="none" v-model="val3">保密
    <p>你的性别：{{val3}}</p>
    <hr>
    <p>爱好</p>
    <input type="checkbox" value="sing" v-model="val4">唱
    <input type="checkbox" value="dance" v-model="val4">跳
    <input type="checkbox" value="rap" v-model="val4">rap
    <input type="checkbox" value="basketball" v-model="val4">打篮球
    <p>你的爱好：{{val4}}</p>
    <hr>
    <p>收货地址</p>
    <select v-model="val5">
      <option value="chengdu">成都</option>
      <option value="chongqing">重庆</option>
      <option value="changsha">长沙</option>
      <option value="xian">西安</option>
    </select>
    <p>{{val5}}</p>
    <hr>
    <p>工作地址</p>
    <!-- multiple：多部分的，多选 -->
    <select v-model="val6" multiple>
      <option value="chengdu">成都</option>
      <option value="shanghai">上海</option>
      <option value="changsha">长沙</option>
      <option value="taibei">台北</option>
    </select>
    <p>{{val6}}</p>
  </div>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        val1: '',
        val2: '',
        val3: '',
        val4: [],
        val5: '',
        val6: []
      }
    })
  </script>
</body>
</html>